﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace chap25 {
    public class MagicEightBallService : IEightBall {
        public MagicEightBallService() {
            Console.WriteLine("The 8-Ball awaits your question...");
        }


        public string ObtainAnswerToQuestion(string userQuestion) {
            string[] answers = {
                                   "Future Uncertain", "Yes", "No",
                                   "Hazy", "Ask again later", "Definitely"
                               };
            // Return a random response.
            Random r = new Random();
            return answers[r.Next(answers.Length)];
        }
    }
}